﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class Calculate
    {
        private double longer;
        private double wide;

        public double Longer
        {
            get
            {
                return this.longer;
            }
            set
            {
                this.longer = value;
            }
        }
        public double Wide
        {
            get
            {
                return this.wide;
            }
            set
            {
                this.wide = value;
            }
        }

        /// <summary>
        /// 计算长方形的面积 
        /// </summary>
        /// <param name="longer">长</param>
        /// <param name="wide">宽</param>
        public void Area(double longer,double wide)
        {
            Console.WriteLine("该长方形的面积为："+(longer * wide));
        }

        /// <summary>
        /// 计算圆的面积 
        /// </summary>
        /// <param name="longer">半径</param>
        public void Area(double longer)
        {
            Console.WriteLine("该圆的面积为：" + (longer * longer * 3.14));
        }
    }
}
